package cn.edu.nju.software.zp13.client.assignment3.studentListXml;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;

import cn.edu.nju.software.zp13.client.assignment3.seeder.StudentGenerator;
import cn.edu.nju.software.zp13.client.assignment3.xmlNodeEntity.Student;

public class StudentList1Xml extends StudentListXml{
	@Override
	protected void processDom(Document dom) {
		Element root = dom.createElement("students");
		addNamespace(root);
		dom.appendChild(root);
		Student[] students = StudentGenerator.run();
		for (Student s : students) {
			Node studentNode = s.toXmlNode(dom);
			root.appendChild(studentNode);
		}
	}
}
